home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 23 / AACD 23.iso / AACD / System / DOpus / DOpusCFG_020 / c / MPEG1Convert < prev    next >
Encoding:
AmigaDOS Script File  |  2001-03-21  |  3.1 KB  |  76 lines

  1. .key SOURCE/A,DEST/A
  2. .bra {
  3. .ket }
  4.  
  5. ; $VER: MPEG1Convert V0.4ß (05-Jan-2001)
  6.  
  7. ;       © 2001 Marcel Rohles
  8.  
  9. ;    -> Maximal quality compression
  10. ;       Destination must be a directory, no ROOT! (e.g.-> "RAM:video/" NOT-> "RAM:"
  11.  
  12. ;                 Program-name / Found at            | Version | Configured Path+Name / misc
  13. ;                 ---------------------------------------------------------------------------
  14. ;   Requires:     mpeg_encode.lha  gfx/conv   AMINET | 1.3     | C:mpeg_encode
  15. ;                 dttoppm.lha      gfx/pbm    AMINET | 1.0     | C:dttoppm
  16. ;                 sendrexx.lha     util/rexx  AMINET | ?       | C:sendrexx
  17.  
  18. ; Startup, mpeg_encode & dttoppm needs ixemul.library V47.3, it will not work with V48 !
  19. ; Raise stack size to suitable size
  20. Stack 300000
  21.  
  22. ; Get information about first and last frame and save them into ENV-variable
  23. echo "Building filelists and setting up variables..."
  24. list {SOURCE} FILES SORT RN LFORMAT="echo >env:PicCountSTART %e" >t:PicCounterSTART
  25. execute t:PicCounterSTART
  26. list {SOURCE} FILES SORT N LFORMAT="echo >env:PicCountEND %e" >t:PicCounterEND
  27. execute t:PicCounterEND
  28.  
  29. ;Create & execute batchfile for converting images into PPM format (SOURCE->DEST)
  30. ;as mpeg_encode can only read PPM, YUV files.
  31. ;View first picture with multiview
  32.  
  33. echo "Showing first frame (If you see nothing press Crtl-D now and install a*Nmatching datatype for fileformat"
  34. list {SOURCE} FILES SORT N LFORMAT="echo >env:PicCountNAME %M" >t:PicCounterNAME
  35. execute t:PicCounterNAME
  36. RUN <>NIL: Multiview {SOURCE}$PicCountNAME.$PicCountSTART
  37. wait 3
  38. echo "Converting pictures now ..."
  39. echo "stack 500000" >t:ConvertBatch
  40. list {SOURCE} SORT N LFORMAT="echo *"%n/$PicCountEND**eM*"*Nc:dttoppm %p%n {DEST}%n" >>t:ConvertBatch
  41. execute t:ConvertBatch
  42. c:sendrexx MULTIVIEW.1 QUIT >NIL:
  43.  
  44.  
  45. ;OK, ready to generate parameter file required for mpeg_encoder
  46. echo "Building parameter file for quality compression and start encoding..."
  47.  
  48. ECHO >T:mpegenc.param "# Created with DOpusCFG"
  49. ECHO >>T:mpegenc.param "PATTERN          IIIIIIIIIIIIIII"
  50. ECHO >>T:mpegenc.param "OUTPUT           {DEST}$PicCountNAME.mpeg"
  51. ECHO >>T:mpegenc.param "BASE_FILE_FORMAT PPM"
  52. ECHO >>T:mpegenc.param "GOP_SIZE         30"
  53. ECHO >>T:mpegenc.param "SLICES_PER_FRAME  1"
  54. ECHO >>T:mpegenc.param "PIXEL            HALF"
  55. ECHO >>T:mpegenc.param "RANGE            10"
  56. ECHO >>T:mpegenc.param "PSEARCH_ALG      LOGARITHMIC"
  57. ECHO >>T:mpegenc.param "BSEARCH_ALG      CROSS2"
  58. ECHO >>T:mpegenc.param "IQSCALE          8"
  59. ECHO >>T:mpegenc.param "PQSCALE          10"
  60. ECHO >>T:mpegenc.param "BQSCALE          25"
  61. ECHO >>T:mpegenc.param "REFERENCE_FRAME  ORIGINAL"
  62. ECHO >>T:mpegenc.param "FORCE_ENCODE_LAST_FRAME"
  63. ECHO >>T:mpegenc.param "INPUT_DIR        {DEST}"
  64. ECHO >>T:mpegenc.param "INPUT"
  65. ECHO >>T:mpegenc.param "$PicCountNAME.** [$PicCountSTART-$PicCountEND]"
  66. ECHO >>T:mpegenc.param "END_INPUT"
  67. ECHO >>T:mpegenc.param "INPUT_CONVERT  **"
  68. c:mpeg_encode t:mpegenc.param
  69.  
  70. ;Cleanup
  71. delete {DEST}$PicCountNAME.#[0-9] QUIET
  72. delete t:ConvertBatch FORCE QUIET
  73. delete t:PicCounter#? FORCE QUIET
  74. delete t:mpegenc.param FORCE QUIET
  75. delete ENV:PicCount#? FORCE QUIET
  76.